from selenium import webdriver


def delete(brower, target):
    row = brower.find_elements_by_tag_name('tr')
    index = 1
    for i in row:
        j = i.find_elements_by_tag_name('td')
        for item in j:
            text = item.text
            if text == target:
                t = j[3].find_elements_by_tag_name('a')
                t[1].click()
                print('删除第是%s行数据' % index)
        index += 1

if __name__ == '__main__':
    driver = webdriver.Chrome()
    driver.get("file:///Users/timbloodzero/Documents/123.html")
    target = "SESU_UK_MAT_ECM_911_STD_CNEN"
    delete(driver, target)